package com.five.community.util;

import org.apache.commons.codec.digest.DigestUtils;

import java.util.UUID;

public class SecurityUtils {

    // 获得盐
    public static String getSalt() {
        String uuid = UUID.randomUUID().toString();
        String salt = uuid.replace("-", "");
        return salt;
    }

    public static String getMD5Password(String password, String salt) {
        return DigestUtils.md5Hex(password + salt);
    }
}
